#include <iostream>
using namespace std;

int main()
{
    int c; double f;          //задаем тип данных чисел
    cout<< "vvedite edinicu ismerenia otrezka"
        <<endl<<"1-Decemetr dm "<<endl
       <<"2-kilometr km"<<endl
      <<"3-metr m"<<endl
     <<"4-milimetr mm"<<endl
    <<"5-santimetr cm"<<endl;
    cin>>c;                   //вводми на экран число
    cout<< "vvedite dlinnu otrezka"
        <<endl<<"f= ";
    cin>>f;


        switch (c) {           //проверяем условие командой case
        case 1: cout<<"dlinna otreska = "
                    <<0.1*f<<" m";
        break;
        case 2: cout<<"dlinna otreska = "
                    <<1000*f<<" m";
        break;
        case 3: cout<<"dlinna otreska = "
                    <<1*f<<" m";
        break;
        case 4: cout<<"dlinna otreska = "
                    <<0.001*f<<" m";
        break;
        case 5: cout<<"dlinna otreska = "
                    <<0.01*f<<" m";
        break;
    }

    return 0;
}
